﻿using EFCore.Models;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using SIService;

namespace WMSWeb.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class MenuController : ControllerBase
    {
        private readonly IMenuService menuService;

        public MenuController(IMenuService menuService)
        {
            this.menuService = menuService;
        }
        /// <summary>
        /// 查询菜单栏
        /// </summary>
        /// <returns></returns>
        [HttpGet("{uid}")]
        public async Task<List<Menu>> GetMenu(int uid)
        {
           return  await menuService.GetMenus(uid);
        }
    }
}
